<template>
	<view>
		<image class="back" src="../../static/images/jpg01.jpg" mode="widthFix"></image>
		<view class="main">
			<view class="textImg">
				<view class="fl">
					<image src="../../static/images/png01.png"></image>
					<view class="h1">进销存全称集团有限公司</view>
				</view>
				<view class="fr">
					<image src="../../static/images/png02.png"></image>
				</view>
			</view>
			<view class="list">
				<view class="li" v-if="$common.checkId(menu,54)" @click="$common.go(1,`/pages/purchase/index`)">
					<view class="h1">
						采购模块
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon02.png" style="width: 85rpx;height: 98rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(menu,74)" @click="$common.go(1,`/pages/salesReport/index`)">
					<view class="h1">
						销售订单统计
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon03.png" style="width: 98rpx;height: 95rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(menu,66)" @click="$common.go(1,`/pages/workOrder/index`)">
					<view class="h1">
						工单管理
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon04.png" style="width: 88rpx;height: 105rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(menu,59)">
					<view class="h1">
						库存管理
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon05.png" style="width: 110rpx;height: 80rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(auth,38)">
					<view class="h1">
						货位管理
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon06.png" style="width: 101rpx;height: 89rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(menu,60)">
					<view class="h1">
						盘点管理
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon07.png" style="width: 94rpx;height: 101rpx"></image>
					</view>
				</view>
				<view class="li" v-if="$common.checkId(menu,67)">
					<view class="h1">
						售后管理
						<image src="../../static/images/icon01.png"></image>
					</view>
					<view class="h2">
						<image src="../../static/images/icon08.png" style="width: 84rpx;height: 103rpx"></image>
					</view>
				</view>
			</view>
		</view>
		<tabBar :valueVal="0"></tabBar>
	</view>
</template>

<script>
	import {mapState,mapActions} from 'vuex'
	export default {
		data() {
			return {
				menu:[],
				auth:[],
			}
		},
		computed:{
			...mapState({
				lang:state=>state.lang.lang
			})
		},
		onLoad() {
			if(!uni.getStorageSync('addressId')){
				this.$common.go(3,`/pages/selectCountry/index`);
			}
			this.menu = uni.getStorageSync('userInfo').menu;
			this.auth = uni.getStorageSync('userInfo').auth;
			this.rest();
		},
		methods: {
			...mapActions(['changeLangFn']),
			rest(){
				this.changeLangFn('zh');
			},
		}
	}
</script>
<style>
	page{
		background: #f5f5f5;
	}
</style>
<style lang="scss" scoped>
	.back{
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
	}
	.main{
		position: relative;
		z-index: 2;
		padding: 80rpx 20rpx 0 20rpx;
		.textImg{
			padding: 0 40rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.fl{
				image{
					width: 367rpx;
					height: 51rpx;
				}
				.h1{
					font-size: 24rpx;
					color: #333;
					margin-top: 8rpx;
				}
			}
			.fr{
				image{
					width: 288rpx;
					height: 288rpx;
				}
			}
		}
		.list{
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			justify-content: space-between;
			.li{
				width: calc(50% - 7rpx);
				background: linear-gradient(180deg,#eff4fd,#ffffff);
				border:3rpx solid #fff;
				border-radius: 15rpx;
				padding: 30rpx 40rpx;
				height: 171rpx;
				box-sizing: border-box;
				position: relative;
				margin-top: 18rpx;
				.h1{
					display: flex;
					align-items: center;
					font-size: 32rpx;
					color: #365aa6;
					image{
						width: 12rpx;
						height: 20rpx;
						margin-left: 30rpx;
					}
				}
				.h2{
					position: absolute;
					bottom: 0;
					right: 35rpx;
				}
			}
		}
	}
</style>
